package com.nd.Utils;


import lombok.Data;

/**
 * @Description: 订单状态返回按钮选项
 * @author: Aaron
 * @create: 2021-06-07 16:23
 **/
@Data
public class WhatOption {

    boolean cancel = false;
    boolean delete = false;
    boolean pay = false;
    boolean comment = false;
    boolean confirm = false;
    boolean refund = false;
    boolean rebuy = false;

    public WhatOption (short status , int comments) {
        if (status == 101) {
            cancel = true;
            pay = true;

        } else if (status == 102) {
            delete = true;

        } else if (status == 103) {
            delete = true;

        } else if (status == 201) {
            refund = true;

        } else if (status == 202) {

        } else if (status == 203) {

        } else if (status == 301) {
            confirm = true;
        } else if (status == 401) {
            if (comments == 0) {
                comment = true;
            }
            delete = true;
            rebuy = true;
        } else if(status == 402) {

            if (comments == 0) {
                comment = true;
            }
            delete = true;
            rebuy = true;
        }
    }
}


